#include <bits/stdc++.h>
using namespace std;
class Solution
{
public:
  vector<int> successfulPairs(vector<int> &spells, vector<int> &potions,
                              long long success)
  {
    vector<int> pairs;
    int n = spells.size();
    int m = potions.size();
    int l, r, mid;
    sort(potions.begin(), potions.end());
    for (int i = 0; i < n; i++)
    {
      l = -1, r = m;
      while (l + 1 < r)
      {
        mid = l + (r - l) / 2;
        if (1ll * spells[i] * potions[mid] < success)
          l = mid;
        else
          r = mid;
      }
      pairs.push_back(m - r);
    }
    return pairs;
  }
};
int main()
{
  Solution s;

  return 0;
}
